import pandas as pd
df = pd.DataFrame({'商品':['苹果','香蕉','梨','香蕉'],
                   '单价(元)':[4,5,4,5],
                   '销量(kg)':[100,120,105,120],
                   '库存(kg)':[50,60,70,60]})
print('原始数据:\n',df)
print('检查所有列的重复值:\n',df.duplicated())
print('firstTture:\n',df.duplicated('单价(元)'))
print('lastTture:\n',df.duplicated('单价(元)'))
print('Tture:\n',df.duplicated('单价(元)',keep=False))
